﻿using Abp.Application.Services;
using Abp.Quartz;
using Choucius.Boilerplate9.JobServices;
using System.Threading.Tasks;

namespace Choucius.Boilerplate9.JobManagers
{
    public class JobManager : IApplicationService
    {
        private readonly IQuartzScheduleJobManager _quartzScheduleJobManager;

        public JobManager(IQuartzScheduleJobManager quartzScheduleJobManager)
        {
            _quartzScheduleJobManager = quartzScheduleJobManager;
        }

        //public string GetString()
        //{
        //    return "成功";
        //}

        public async Task GetStartJob()
        {
            JobService j = new JobService(_quartzScheduleJobManager);
            await j.ScheduleJob();
        }
    }
}
